import { ReactNode } from "react";
import Header from "@/components/website/Header";
import { useAuth } from "@/context/AuthContext";
import { Toaster } from "@/components/ui/sonner";
import { PageContainer } from "./PageContainer";

interface ShopLayoutProps {
  children: ReactNode;
  className?: string;
}

export function ShopLayout({ 
  children, 
  className = "",
}: ShopLayoutProps) {
  const { user } = useAuth();
  
  return (
    <div className="min-h-screen bg-background">
      <Header 
        nickname={user?.nickname || "用户"}
        avatarUrl={user?.avatarUrl}
      />
      <PageContainer className={`${className} mx-auto py-6 px-4`}>
      {children}
      </PageContainer>  

    </div>
  );
} 